package com.wdg.controller;

import com.wdg.pojo.Cookbook;
import com.wdg.pojo.User;
import com.wdg.service.ICookBookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@CrossOrigin
@RequestMapping("/provider_cookbook")
public class CookBookController {

    @Autowired
    private ICookBookService cookBookService;

    @PostMapping("/addCookBook")
    public boolean addCookBook(@RequestBody Cookbook cookbook){
        return cookBookService.addCookBook(cookbook) > 0;
    }


}
